package polymorphism;

public class Cat extends Animal{
    public Cat (String name,int age){
        //显示使用父类的有参构造
        super(name,age);
    }
    //方法重写
    public void eat(){
        System.out.println(this.name+"吃猫粮");
    }
}
